<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

</head>
<body>
<div id="aa">
    <h3>dasdasd</h3>
</div>
</body>
<script type="text/javascript">
    window.onload = function () {
        var div = document.getElementById("aa");
        var span = document.createElement("span");
        div.setAttribute("style", "border:1px solid red")
        span.innerHTML = "<h3>dasdasd</h3>";
        div.appendChild(span);
        console.log(div);
    }
</script>
</html>